/** 轮播 */
<template>
    <div class="wrapper">
    <swiper v-bind:options="swiperOption" v-if="list.length">
        <swiper-slide v-for="item in list" v-bind:key="item.id">
            <img v-bind:src="item.url" alt="" class="swiper-img" />
        </swiper-slide>
        <div class="swiper-pagination" slot="pagination"></div>
        <div v-show="false" class="swiper-button-prev" slot="button-prev"></div>
        <div v-show="false" class="swiper-button-next" slot="button-next"></div>
        <div v-show="false" class="swiper-scrollbar" slot="scrollbar"></div>
    </swiper>
    </div>
</template>

<script>
export default {
  name: "HomeSwiper",
  props:{
    list:Array
  },
  data() {
    return {
      swiperOption: {
        pagination: ".swiper-pagination",
        loop: true//,autoplay:true
      },
    //   list: [
    //     { id: "001", url: require("../../../assets/imgadv/Adv (1).jpg") },
    //     { id: "002", url: require("../../../assets/imgadv/Adv (2).jpg") },
    //     { id: "003", url: require("../../../assets/imgadv/Adv (3).jpg") },
    //     { id: "004", url: require("../../../assets/imgadv/Adv (4).jpg") },
    //     { id: "005", url: require("../../../assets/imgadv/Adv (5).jpg") },
    //     { id: "006", url: require("../../../assets/imgadv/Adv (6).jpg") },
    //     { id: "007", url: require("../../../assets/imgadv/Adv (7).jpg") },
    //     { id: "008", url: require("../../../assets/imgadv/Adv (8).jpg") },
    //     { id: "009", url: require("../../../assets/imgadv/Adv (9).jpg") }
    //   ]
    };
  }
};
</script>

<style lang="stylus" scoped>
.wrapper >>> .swiper-pagination-bullet-active {
    background: #fff;
}

.wrapper >>> .swiper-pagination-bullet {
    width: 0.2rem;
    height: 0.2rem;
}

.wrapper {
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 31%;
    background: #eee;

    .swiper-img {
        width: 100%;
        height 100%
    }
}
</style>

